﻿@model BenzInfo.Hockey.LHRAF.Models.User
@using MvcEnumDropDownList.Helpers;

@{
    ViewBag.Title = BenzInfo.Hockey.LHRAF.Resources.Dictionary.Create;
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<script type="text/javascript">

    $(document).ready(function () {
        $('#Category').val('@Request["Category"]');
    });

</script>

@using (Html.BeginForm("Create", "Users", FormMethod.Post, new { @encType = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>@BenzInfo.Hockey.LHRAF.Resources.Dictionary.User</legend>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.Category)
        </div>
        <div class="editor-field">
            @Html.EnumDropDownListFor(model => model.Category, string.Empty)
            @Html.ValidationMessageFor(model => model.Category)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.LastName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.UserName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.UserName)
            @Html.ValidationMessageFor(model => model.UserName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Password)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Password)
            @Html.ValidationMessageFor(model => model.Password)
        </div>
       
    </fieldset>
}
